Behavior Actions
IO River supports a variety of actions that can be added to a behavior, including the following.
Cache Control
Cache Behavior
This action controls whether content should be cached by the CDN.
Arguments:
- Behavior - Select either Cache or Bypass.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Cache TTL
This action specifies the duration the CDN is allowed to keep content in the cache. When the TTL expires, the CDN will attempt to revalidate the content using an IMS request.
Arguments:
- Cache TTL - Duration in seconds.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Status Code Cache
This action provides control over caching by status code. You can set the cache TTL for specific status codes or groups (e.g., 4xx). This action can be used to control the caching of errors.
Arguments:
- Status Code Cache - Either a specific status code or a group of status codes.
- Behavior - Select either Cache or Bypass.
- Cache TTL - Duration in seconds.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Browser Cache TTL
This action controls how long the browser is allowed to cache the content. The CDN will add a Cache-Control header to the response sent to end-users with the configured cache TTL.
Arguments:
- Cache TTL - Duration in seconds.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Status Code Browser Cache
This action controls browser caching by status code. For specified status codes, the CDN will add a Cache-Control header to the response with the configured TTL.
Arguments:
- Status Code Cache - Either a specific status code or a group of status codes.
- Cache TTL - Duration in seconds.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Add Cache Tag
This action controls adding tags to content stored in the CDN cache, which allows you to purge portions of the cache later on (purge by tag).
Arguments:
- Tag Name - The name for the tag to add.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Cache Tag Response Header
This action allows you to seemlessly use headers generated by the origin, which contain cache tags, on all the CDN providers. For example, if your origin returns a Edge-Cache-Tag header in the response, set the action to recognize this header and the tag will be used on CDNs that do not obey this header normally.
Arguments:
- Tag Name - The header name created on the origin that contains the cache tag.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Cache Key
This action provides control over how content is stored in the CDN cache. You can select the components of the cache key used to store objects in the CDN cache. For example, if you specify the Origin header as part of the cache key, the CDN will store different copies of the response in the cache for different values of Origin in the request header.
Arguments:
- Headers - List of headers to be included in the cache key. Select Include to specify a list of headers, or None to exclude all headers.
- Query Strings - List of query string parameters to include or exclude in the cache key. You can also choose to include all or none.
- Cookies - List of cookies to include in the cache key. Select Include to specify a list of cookies, or None to exclude all cookies.
- Country - Select Include to add the request's originating country in the cache key (default: exclude).
- Device Type - Select Include to add the device type the request was sent from in the cache key (default: exclude).
CDN providers that support this action
| Component | VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Header | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| Query String | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| Cookie | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| Device Type | Y | Y | Y | Y | ||||||||
| Country | Y | Y | Y | Y | Y |
Cached Methods
This action controls the list of HTTP methods whose responses the CDN will cache.
Arguments:
- Cached Methods - List of HTTP methods.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Origin Cache Control
This action controls whether the CDN should honor the Cache-Control header sent by the origin. By default, origin Cache-Control headers are not honored by the CDN.
Arguments:
- Enabled - Flag to enable or disable origin cache control.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y |
Stale TTL
This action sets the time duration the CDN can serve expired content from the cache. If the content is expired and there is a problem fetching it from the origin, the CDN can serve stale content for the specified duration.
Arguments:
- Cache TTL - Duration in seconds.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y |
Access Control
Allowed Methods
This action controls the list of HTTP methods allowed for this service. If an end user attempts to use a disallowed method, the CDN responds with status code 405.
Arguments:
- Allowed Methods - List of HTTP methods.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Viewer Protocol
This action controls how the CDN should respond to HTTP requests. The CDN can either accept both HTTP and HTTPS, redirect HTTP to HTTPS, or restrict access to HTTPS only. If HTTPS-only is selected, the CDN will respond with a 403 status code to HTTP requests.
Arguments:
- Policy - Type of viewer protocol policy.
CDN providers that support this action
| Component | VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RedirectHttpToHttps | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |
| HttpsOnly | Y | Y | Y | Y | ||||||||
| HttpAndHttps | Y | Y | Y | Y | Y |
URL Signing
This action controls whether the CDN should verify the URL signature before allowing access to the content.
For more information, refer to Signed URLs.
Arguments:
- URL Signing - Flag to enable or disable signature verification.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y |
Deny Access
This action controls whether the CDN should deny access to requests that meet the behavior condition.
Arguments:
- Deny Access - Flag to enable or disable denying access.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Deny Access By IP
This action controls whether the CDN should deny access to a specific set of IP addresses.
Arguments:
- IP Addresses - A list of IP addresses to deny access.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Deny Access By Time
This action controls whether the CDN should deny access during a specific time period. The time period can be either a fixed interval or a recurring one.
Arguments:
- Repeatable - Indicates whether the time interval is periodic.
Arguments for a non-periodic interval:
- Time Range - The UTC start and end time of the interval.
Arguments for a periodic interval:
- Start Time - The start time in UTC.
- Deny Duration - The duration of time to deny access.
- Repeat Period - The interval at which the deny access rule repeats.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Allow Access Only From IP
This action controls whether the CDN should allow access to a specific set of IP addresses, and deny access from all others.
Arguments:
- IP Addresses - A list of IP addresses to allow access.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y |
Performance Optimization
Compression
This action controls whether the CDN should compress responses from the origin before sending them to end users. CDN compression applies only to compressible file types.
Arguments:
- Enabled - Flag to enable or disable compression.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Large Files Optimization
This action controls how the CDN handles large files (over 50MB). Enable this flag if you are working with large files. When enabled, the CDN stores large file in segments within the cache.
Arguments:
- Enabled - Flag to enable or disable large file optimization.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Header Control
Host Header Override
This action controls the Host header sent in requests to the origin. By default, the viewer's Host header is sent to the origin, but this action allows customization.
Arguments:
- Host Header Value - The custom
Hostheader value. - Use Origin Host - If checked, the origin domain will be used for the
Hostheader.
CDN providers that support this action
| Component | VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Header Override | Y | Y | Y | Y | Y | Y | Y | Y | ||||
| Use Origin | Y | Y | Y | Y | Y | Y | Y | Y |
Set CORS Header
This action controls CORS headers added to the end-user response.
Arguments:
- CORS Header Name - Type of CORS header.
- Header Value - Value of the header to set.
- Override - If checked, any existing CORS header with the same name will be overridden.
CDN providers that support this action
| Component | VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Allow Credentials | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| Allow Headers | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| Allow Methods | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| Allow Origin | Y | Y | Y | Y | Y | Y | ||||||
| Expose Headers | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| Max Age | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Set Request Header
This action adds a custom header to requests sent to the origin.
Arguments:
- Header Name - Name of the header to set.
- Header Value - Value of the header to set.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Set Provider Name Request Header
This action adds a custom header to requests sent to the origin, with the value of the CDN serving the request.
Arguments:
- Header Name - Name of the header to set.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y |
Delete Request Header
This action removes a specified header from the end-user request.
Arguments:
- Header Name - Name of the header to delete.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y |
Set Response Header
This action adds a custom header to the response sent to end-users. For setting CORS headers, use the Set CORS Header action.
Arguments:
- Header Name - Name of the header to set.
- Header Value - Value of the header to set.
- Override - If checked, any existing header with the same name will be overridden.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Set Provider Name Response Header
This action adds a custom header to the response sent to the origin, with the value of the CDN serving the request.
Arguments:
- Header Name - Name of the header to set.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y |
Delete Response Header
This action removes a specified header from the end-user response.
Arguments:
- Header Name - Name of the header to delete.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Delete Origin Response Header
This action removes a specified header generated by the origin, from the when the content is stored in the CDN cache, which allows you to override behaviors generated on the origin. For example, you can use it to delete the "Cache-Control" header, so that this header will not impact caching.
Arguments:
- Header Name - Name of the header to delete.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Other Actions
Redirect to URL
This action enables sending a redirect response with a specified URL.
Arguments:
- Destination - URL to redirect to.
- Source - Optional wildcard path to match in order to redirect multiple URLs
CDN providers that support this action
| Component | VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Static | Y | Y | Y | Y | Y | Y | Y | Y | Y | |||
| Dynammic | Y |
URL Rewrite
This action enables rewriting the request path. The destination path can be a static string or can be derived from a regular expression. This action takes place before the content is retrieved from the cache.
Arguments:
- Source - The source request path.
- Destination - The new path, which can be either a static string or a regex.
Example:
The definition below removes the static prefix from the request path:
- Source:
/static/(.*) - Destination:
/$1
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y |
Stream Log
This action allows streaming CDN access logs to your logging destination (e.g., an S3 bucket). All logs are streamed in a unified format, regardless of the CDN generating them.
Arguments:
- Log Destination - Storage destination for the logs. You can configure the log destination as described here.
- Sample Rate - Percentage of logs to stream.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y | Y | Y | Y |
Generate Preflight Response
This action controls how the CDN should respond to a preflight request. The CDN can respond to a preflight request without forwarding it to the origin. You can configure the headers to include in the preflight response.
Arguments:
- Allowed Methods - Value for the
Access-Control-Allow-Methodsheader. - Max-Age - Value for the
Access-Control-Max-Ageheader. - Allowed Headers - Value for the
Access-Control-Allow-Headersheader.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y |
Generate Response
This action allows you to return a reponse to the viewer, as generated by the origin on a fixed path.
Arguments:
- Status Code - The HTTP status code viewers will receive.
- Response Page Path - The path to the URI where the response is generated.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |
Follow Redirects
This action enables the CDN to follow a redirect response from the origin. If the origin responds with a redirect, the CDN will follow it and return the response to the end user.
This action has the following limitations:
- The host in the
Locationheader must be defined as an origin in the service. - The scheme in the
Locationheader must beHTTPS.
Arguments:
- Enabled - Flag to enable or disable follow redirects.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y | Y | Y | Y |
True Client IP
This action controls whether the CDN should add a True-Client-IP header when forwarding the request to the origin.
Arguments:
- True Client IP - Flag to enable or disable adding the header.
CDN providers that support this action
| VCDN | Fastly | CloudFront | Cloudflare | Akamai | GCP Cloud | GCP Media | Cachefly | Azure CDN | Bunny CDN | Gcore | Mainstreaming |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Y | Y |